package com.ibeeking.found.common.enums.qr;

/**
 * @Author ibeeking
 * @Date: 2021-01-05 19:15
 * @Description: 扫码场景枚举
 */
public enum QrSceneEnum {
    /**
     * 扫码场景枚举
     */
    SHOP_PARKING_ISSUE_COUPON(1, "停车场商户领券", "pages/mallService/coupon/myCoupon/myCoupon"),

    /**
     * 推广计划
     */
    EXTEND_PLAN_SCENE(2, "推广计划场景", "pages/main/index/index"),

    /**
     * 组合券包
     */
    GROUP_COUPON_SCENE(3, "组合券包场景", "pages/main/index/index"),
    ;

    private Integer code;
    private String lable;
    private String pages;

    QrSceneEnum(Integer code, String lable, String pages) {
        this.code = code;
        this.lable = lable;
        this.pages = pages;
    }

    public Integer getCode() {
        return code;
    }

    public String getLable() {
        return lable;
    }

    public String getPages() {
        return pages;
    }

    public static QrSceneEnum getEnum(Integer code) {
        for (QrSceneEnum enumObj : values()) {
            if (enumObj.getCode().equals(code)) {
                return enumObj;
            }
        }
        return null;
    }
}
